//=============================================================================
// ProMesh.NET - .NET Web Application Framework 
//
// Copyright (c) 2003-2008 Philippe Leybaert
//
// Permission is hereby granted, free of charge, to any person obtaining a copy 
// of this software and associated documentation files (the "Software"), to deal 
// in the Software without restriction, including without limitation the rights 
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
// copies of the Software, and to permit persons to whom the Software is 
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in 
// all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//=============================================================================

using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Text;
using System.Web;

namespace Activa.ProMesh
{
    public abstract class ProMeshHttpResponse
    {
        private View _renderedView;

        public abstract HttpCookieCollection Cookies { get; }
        public abstract void Write(string s);
        internal abstract string Output { get; }
        public abstract void End();
        public abstract void Redirect(string url);
        public abstract int StatusCode { get; set; }
        public abstract string ContentType { get; set; }
        public abstract void BinaryWrite(byte[] bytes);
        public abstract void AppendHeader(string header, string value);
        public abstract void ClearHeaders();

        public abstract Stream OutputStream { get; }

        public abstract void AddCacheItemDependencies(ArrayList cacheKeys);
        public abstract void AddCacheItemDependencies(string[] cacheKeys);
        public abstract void AddCacheItemDependency(string cacheKey);
        public abstract void AddFileDependencies(ArrayList filenames);
        public abstract void AddFileDependencies(string[] filenames);
        public abstract void AddFileDependency(string filename);
        public abstract void AddHeader(string name, string value);
        public abstract void AppendCookie(HttpCookie cookie);
        public abstract void AppendToLog(string param);
        public abstract string ApplyAppPathModifier(string virtualPath);
        public abstract void Clear();
        public abstract void ClearContent();
        public abstract void Close();
        public abstract void DisableKernelCache();
        public abstract void Flush();
        public abstract void Pics(string value);
        public abstract void Redirect(string url, bool endResponse);
        public abstract void SetCookie(HttpCookie cookie);
        public abstract void TransmitFile(string filename);
        public abstract void TransmitFile(string filename, long offset, long length);
        public abstract void Write(char ch);
        public abstract void Write(object obj);
        public abstract void Write(char[] buffer, int index, int count);
        public abstract void WriteFile(string filename);
        public abstract void WriteFile(string filename, bool readIntoMemory);
        public abstract void WriteFile(IntPtr fileHandle, long offset, long size);
        public abstract void WriteFile(string filename, long offset, long size);

        public abstract bool Buffer { get; set; }
        public abstract bool BufferOutput { get; set; }
        public abstract string CacheControl { get; set; }
        public abstract string Charset { get; set; }
        public abstract Encoding ContentEncoding { get; set; }
        public abstract int Expires { get; set; }
        public abstract DateTime ExpiresAbsolute { get; set; }
        public abstract Stream Filter { get; set; }
        public abstract Encoding HeaderEncoding { get; set; }
        public abstract NameValueCollection Headers { get; }
        public abstract bool IsClientConnected { get; }
        public abstract bool IsRequestBeingRedirected { get; }
        public abstract string RedirectLocation { get; set; }
        public abstract string Status { get; set; }
        public abstract string StatusDescription { get; set; }
        public abstract int SubStatusCode { get; set; }
        public abstract bool SuppressContent { get; set; }
        public abstract bool TrySkipIisCustomErrors { get; set; }

        public abstract void DisableCaching();
        public abstract void SetETag(string eTag);

        internal View RenderedView
        {
            get { return _renderedView; }
            set { _renderedView = value; }
        }
    }
}